package com.wangyadong.hobby.schedule.jobtask.jvm.OOM;

public class JavaVMStackOOM {
    private void dontStop() {
        while (true) {
            System.out.println("================");
        }
    }

    public void stackLeakByThread() {
        while (true) {
            new Thread(() -> {
                dontStop();
            }).start();
        }
    }

    public static void main(String[] args) {
        JavaVMStackOOM javaVMStackOOM = new JavaVMStackOOM();
        javaVMStackOOM.stackLeakByThread();
    }
}
